html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  display: flex;
  background-image: linear-gradient(to bottom, #00bdea 50%, #208ff9 50%);
}

$bes: (0.48, 0.43, 0.29, 1.3);
$textBes: (0.48, 0.43, 0.7, 2.5);

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.container {
  margin: auto;
  width: auto;
  height: 90px;
  background-color: #fff;
  border-radius: 5px;
  position: relative;
  input {
    position: absolute;
    z-index: -10;
    &:checked {
      & ~ .nav-container {
        width: 390px;
        .tab-list {
          .item {
            .item-txt {
              opacity: 1;
              transform: rotateY(0);
            }
            &:nth-child(1) {
              .item-txt {
                transition-delay: 0s;
              }
            }
            &:nth-child(2) {
              .item-txt {
                transition-delay: 0.1s;
              }
            }
            &:nth-child(3) {
              .item-txt {
                transition-delay: 0.2s;
              }
            }
            &:nth-child(4) {
              .item-txt {
                transition-delay: 0.3s;
              }
            }
          }
        }
      }

      & ~ .icon-wraper {
        &::before {
          transform: translateY(7px) rotate(-225deg);
        }
        &::after {
          transform: translateY(-7px) rotate(225deg);
        }
      }
    }
  }
  .icon-wraper {
    position: absolute;
    top: 0;
    right: 0;
    width: 90px;
    height: 90px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    &::before {
      content: "";
      display: block;
      height: 4px;
      width: 28px;
      background-color: #096dd3;
      margin-bottom: 10px;
      border-radius: 5px;
      transform-origin: 50% 50%;
      transition: transform 1s cubic-bezier($bes);
    }
    &::after {
      content: "";
      display: block;
      height: 4px;
      width: 28px;
      background-color: #096dd3;
      border-radius: 5px;
      transform-origin: 50% 50%;
      transition: transform 1s cubic-bezier($bes);
    }
  }
  .nav-container {
    width: 90px;
    height: 90px;
    transition: width 1s cubic-bezier($bes);
    .tab-list {
      height: 100%;
      padding: 0 100px 0 10px;
      display: flex;
      justify-content: space-between;
      box-sizing: border-box;
      width: 390px;
      .item {
        flex-shrink: 0;
        width: 70px;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        color: #6c7784;
        font-weight: bold;
        font-size: 14px;
        cursor: pointer;
        &:hover {
          color: #00bdea;
        }
        .item-txt {
          opacity: 0;
          transition: transform 0.7s cubic-bezier($textBes), opacity 0.2s;
          transform: rotateY(-70deg);
        }
        &:nth-child(1) {
          .item-txt {
            transition-delay: 0.3s;
          }
        }
        &:nth-child(2) {
          .item-txt {
            transition-delay: 0.2s;
          }
        }
        &:nth-child(3) {
          .item-txt {
            transition-delay: 0.1s;
          }
        }
        &:nth-child(4) {
          .item-txt {
            transition-delay: 0s;
          }
        }
      }
    }
  }
}
